import {Interaction} from './interaction.interface'
import unistore from '../../store/index'

export class MpService implements Interaction{
	login() {
		return new Promise((resolve,reject) => {
			uni.login({
			  provider: 'weixin',
			  success: function (loginRes:any) {
				resolve(loginRes.code)
			  }
			});
		}).then(res =>res)
	}
	quit(){
		// this.window.android.ksdBack();
	}
	getcamera() {
		return ''
	}
	compressImage(options:{
		path:string,
		success: any
	}){
		uni.compressImage({
			src:options.path,
			quality:10,
			success:options.success
		})
	}
}